﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using BugTracker.WebUX.WebCode;
using System.Web.SessionState;

namespace BugTracker.WebUX.Shared
{
    /// <summary>
    /// Summary description for FetchSessionImage
    /// </summary>
    public class FetchSessionImage : IHttpHandler, IRequiresSessionState
    {

        public void ProcessRequest(HttpContext context)
        {
            byte[] img = BTSession.Image;
            if (img != null)
            {
                context.Response.ContentType = "image/jpg";
                context.Response.BinaryWrite(img);
                context.Response.Flush();
            }
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}